#include <iostream>
#include <cstdio>
using namespace std;
double myC(double n, double m, double k) {
    double res=1.0;
    for (double i=0.0; i<m-1; ++i) {
        res=res*(n-i)/(n-i+k);
    }
    res=res*m/(n+k-m+1);
    return res;
}
double solve(double n, double m) {
    int k=(n+1-m)/(m-1);
    double res=k*myC(n, m, k);
    k+=1;
    res=max(res, k*myC(n, m, k));
    k-=2;
    res=max(res, k*myC(n, m, k));
    return res;
}
int main(int argc, char** argv) {
    #ifdef hai
    freopen("in.txt", "r", stdin);
    #endif
    double n,m;
    while(cin>>n>>m) {
        printf("%0.12lf\n", solve(n,m));
    }
    return 0;
}
